tools/oxenstored: Automatically resume when possible
authorEdwin Török <edvin.torok@citrix.com>
Fri, 8 Jan 2021 11:57:37 +0000 (11:57 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Jan 2021 15:22:42 +0000 (15:22 +0000)
commit4387b4c771feaf0455ea3dc9b4b199f51166c721
treeadaee3b8c1bb23f70dd00504b47c2d3d2ed81c57
parente663158bca89aa81ea567befc7c0f742568a6194
tools/oxenstored: Automatically resume when possible

When a `db` file exists use it to resume oxenstored.  It will contains a
xenstore tree, domain reconnection info, and watches.

It is currently missing data about all active socket connections, so a
toolstack should ideally be stopped and restarted too.

Tell systemd about oxenstored's PID and allow it to restart on success.

This should make updating oxenstored as easy as: `systemctl stop -s SIGTERM
xenstored` on a suitable xenstored version.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Reviewed-by: Pau Ruiz Safont <pau.safont@citrix.com>
Reviewed-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/xenstored/xenstored.ml